package main.flex.manager.template
{
	import main.flex.component.main.FlexAnimatedCat;
	import main.flex.widget.template.WiiavieHelpWidget;
	
	import mx.containers.Canvas;
	
	import org.servebox.foundry.widget.WidgetManager;

	public class WiiavieHelpWidgetManager extends WidgetManager
	{
		private var _animatedCat				: FlexAnimatedCat;
		
		public function WiiavieHelpWidgetManager()
		{
			super();
		}
		
		public function get currentWidget() : WiiavieHelpWidget
		{
			return WiiavieHelpWidget( getWidget() );
		}
		
		public function get animatedCat ( ) : FlexAnimatedCat
		{
			return _animatedCat;
		}
		
		public function set animatedCat ( val : FlexAnimatedCat ) : void
		{
			_animatedCat = val;
		}
		
		public function initHelpCat( container : Canvas ) : void
		{
			/*
			var pretarget : DisplayObjectContainer = DisplayObjectContainer( 
						this.getChildByName(
							backgroundHolder.id
							)
						);
			Alert.show(
					pretarget.getChildAt(
							0
							).toString()
					);*/
			animatedCat = new FlexAnimatedCat();
			animatedCat.id			=	"animatedCat";
			
			//var targetContainer		: DisplayObjectContainer = DisplayObjectContainer( this.getChildByName( canvasHolder.id ) ).getChildAt( 0 ) as DisplayObjectContainer;
			container.addChildAt( animatedCat, container.numChildren );
			//addChild( animatedCat );
			animatedCat.boundingBoxName = "boundingBox";
			animatedCat.scaleX = .3;
			animatedCat.scaleY = .3;
			animatedCat.x = 945;
			animatedCat.y = -95;
			//animatedCat.move( 200, 200 );
			
			//Alert.show("chat : "+animatedCat.width.toString());
			//Alert.show("bB : "+animatedCat.boundingBox.width.toString());
			animatedCat.buttonMode	= true;
		}
	}
}